﻿using System;
using System.Data;

namespace TMDT.BusinessObjects
{
    public class LoaiTaiKhoan
    {
        public Guid IDLoaiTaiKhoan { get; set; }
        public string TenLoaiTaiKhoan { get; set; }
        public int Quyen { get; set; }

        public static LoaiTaiKhoan Convert(DataRow row)
        {
            LoaiTaiKhoan loaiTaiKhoan = new LoaiTaiKhoan();
            loaiTaiKhoan.IDLoaiTaiKhoan = new Guid(row["IDLoaiTaiKhoan"].ToString());
            loaiTaiKhoan.TenLoaiTaiKhoan = row["TenLoaiTaiKhoan"].ToString();
            loaiTaiKhoan.Quyen = int.Parse(row["Quyen"].ToString());

            return loaiTaiKhoan;
        }
    }
}
